﻿@using BootstrapBlazor.Shared.Samples;
@inject IStringLocalizer<Tags> Localizer

<div class="row g-3">
    <div class="col-4 col-sm-auto">
        <Tag Color="Color.Primary" ShowDismiss="true" OnDismiss="@DismissClick">@Localizer["Tag1"]</Tag>
    </div>
    <div class="col-4 col-sm-auto">
        <Tag Color="Color.Secondary" ShowDismiss="true" OnDismiss="@DismissClick">@Localizer["Tag2"]</Tag>
    </div>
    <div class="col-4 col-sm-auto">
        <Tag Color="Color.Success" ShowDismiss="true" OnDismiss="@DismissClick">@Localizer["Tag3"]</Tag>
    </div>
    <div class="col-4 col-sm-auto">
        <Tag Color="Color.Danger" ShowDismiss="true" OnDismiss="@DismissClick">@Localizer["Tag4"]</Tag>
    </div>
    <div class="col-4 col-sm-auto">
        <Tag Color="Color.Warning" ShowDismiss="true" OnDismiss="@DismissClick">@Localizer["Tag5"]</Tag>
    </div>
    <div class="col-4 col-sm-auto">
        <Tag Color="Color.Info" ShowDismiss="true" OnDismiss="@DismissClick">@Localizer["Tag6"]</Tag>
    </div>
    <div class="col-4 col-sm-auto">
        <Tag Color="Color.Dark" ShowDismiss="true" OnDismiss="@DismissClick">@Localizer["Tag7"]</Tag>
    </div>
</div>
<ConsoleLogger @ref="Logger" class="mt-3" />

@code {
    [NotNull]
    private ConsoleLogger? Logger { get; set; }

    private Task DismissClick()
    {
        Logger.Log($"Tag Dismissed");
        return Task.CompletedTask;
    }
}
